package com.itheima.myscoket.Demo4;

import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;

/*
客户端
 */
public class Demo1 {
    public static void main(String[] args) throws IOException {
        //创建Socket对象
        Socket s = new Socket("127.0.0.1",10000);
        //获得一个IO流开始写数据
        OutputStream os = s.getOutputStream();
        os.write("wahaha".getBytes());
        //释放资源
        s.close();
        os.close();
    }
}
